﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.models {
    import net.wooga.pets.events.*;

    public class SlotModule4x4 extends SlotModule {

        protected var m_containing2x2Modules:Array;

        public function SlotModule4x4(_arg1:int){
            super(_arg1);
            m_maxNumberOfItems = 16;
            this.m_containing2x2Modules = [];
        }
        override public function set isActive(_arg1:Boolean):void{
            var _local2:SlotModule;
            this.m_isActive = _arg1;
            for each (_local2 in this.m_containing2x2Modules) {
                _local2.isActive = true;
            };
            eventdispatcher.dispatchEvent(new SlotModuleEvent(SlotModuleEvent.MODULE_2X2_IS_ACTIVE, id));
        }
        public function add2x2Module(_arg1:SlotModule):void{
            this.m_containing2x2Modules.push(_arg1);
        }
        public function get containing2x2Modules():Array{
            return (this.m_containing2x2Modules);
        }
        public function hasTopActiveModule():Boolean{
            if (m_modules.length == (id + 1)){
                return (false);
            };
            var _local1:SlotModule4x4 = m_modules[(id + 1)];
            return (_local1.isActive);
        }
        public function hasBottomActiveModule():Boolean{
            if (id == 0){
                return (false);
            };
            var _local1:SlotModule4x4 = m_modules[(id - 1)];
            return (_local1.isActive);
        }
        public function getTopModule():SlotModule4x4{
            var _local1:SlotModule4x4 = m_modules[(id + 1)];
            return (_local1);
        }
        public function getBottomModule():SlotModule4x4{
            var _local1:SlotModule4x4 = m_modules[(id - 1)];
            return (_local1);
        }

    }
}//package net.wooga.pets.models 
